<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js</title>
</head>
<body>
	<h1>aaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaa</h1>
</body>

<script>
	hidobj=document.getElementsByTagName('h1');


	for(i=0;i<hidobj.length;i++){
		hidobj[i].style.background='#f0f';
	}

</script>
</html>